# -*- coding: utf-8 -*-

<table width="90%" height="1%" border="0" valign="middle" align="center" class="BoxCenter">    
    <tr>
        <form name="fmSearch" method="get">
        <td width="35%">
            <input type="text" name="id" class="BoxCenter" value="${c.searchVal}">
            <input type="submit" value="Фильтровать" class="BoxCenter">
        </td>
        <td width="30%"> 
            <label class="FormCaptionRight">
                    %if c.checked == 2:
                        <input type="radio" name="by" value="id" checked>по номеру
                    %else:
                        <input type="radio" name="by" value="id">по номеру
                    %endif
                </label>
                <label class="FormCaptionRight">
                    %if c.checked == 1:
                        <input type="radio" name="by" value="name" checked>по наименован.
                    %else:
                        <input type="radio" name="by" value="name">по наименован.
                    %endif
            </label>
        </td>
        </form>
        <td>
            ${c.searchErr}
            %if c.searchErr != "":
                <a href="./" class="FormCaptionRight">(снять фильтр)</a>
            %endif
        </td>
    </tr>
    <tr>
        <td width="10%">        
	        <form name="fmCategory" method="get">
		        <select name="category_id" onChange="this.form.submit()" class="BoxCenter">
					  %for categ in c.category:
				        <option value="${ categ.id }">${ categ.name }</option>
					  %endfor
				  </select>
			  </form>
		  </td>	  	  	

            <!--form name="fmType" method="get">
                <select name="id" onChange="this.form.submit()" class="BoxCenter">
                    <option value="" selected>Отбор по типу</option>
                    <option value="3">CD (Audio)</option>
                    <option value="4">CD (PC)</option>
                    <option value="8">CD (Video)</option>
                    <option value="7">DVD (Audio)</option>
                </select>
                <input type="hidden" name="by" id="by" value="type">
            </form-->
        </td>
        <td>
            <!--form name="fmCategory" method="get">
                <select name="id" onChange="this.form.submit()" class="BoxCenter">
                    <option value="" selected>Отбор по жанру</option>
                    <option value="3">CD (Audio)</option>
                    <option value="4">CD (PC)</option>
                    <option value="8">CD (Video)</option>
                    <option value="7">DVD (Audio)</option>
                </select>
                <input type="hidden" name="by" id="by" value="category">
            </form-->
        </td>
    </tr>
</table>


